package com.zhengshang.api.service.impl;

import java.util.List;
import com.zhengshang.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhengshang.api.mapper.AppBillRefundRecordMapper;
import com.zhengshang.api.domain.AppBillRefundRecord;
import com.zhengshang.api.service.IAppBillRefundRecordService;

/**
 * 话费退款记录Service业务层处理
 * 
 * @author zhengshang
 * @date 2021-06-09
 */
@Service
public class AppBillRefundRecordServiceImpl implements IAppBillRefundRecordService 
{
    @Autowired
    private AppBillRefundRecordMapper appBillRefundRecordMapper;

    /**
     * 查询话费退款记录
     * 
     * @param recordId 话费退款记录ID
     * @return 话费退款记录
     */
    @Override
    public AppBillRefundRecord selectAppBillRefundRecordById(Long recordId)
    {
        return appBillRefundRecordMapper.selectAppBillRefundRecordById(recordId);
    }

    /**
     * 查询话费退款记录列表
     * 
     * @param appBillRefundRecord 话费退款记录
     * @return 话费退款记录
     */
    @Override
    public List<AppBillRefundRecord> selectAppBillRefundRecordList(AppBillRefundRecord appBillRefundRecord)
    {
        return appBillRefundRecordMapper.selectAppBillRefundRecordList(appBillRefundRecord);
    }

    /**
     * 新增话费退款记录
     * 
     * @param appBillRefundRecord 话费退款记录
     * @return 结果
     */
    @Override
    public int insertAppBillRefundRecord(AppBillRefundRecord appBillRefundRecord)
    {
        appBillRefundRecord.setCreateTime(DateUtils.getNowDate());
        return appBillRefundRecordMapper.insertAppBillRefundRecord(appBillRefundRecord);
    }

    /**
     * 修改话费退款记录
     * 
     * @param appBillRefundRecord 话费退款记录
     * @return 结果
     */
    @Override
    public int updateAppBillRefundRecord(AppBillRefundRecord appBillRefundRecord)
    {
        appBillRefundRecord.setUpdateTime(DateUtils.getNowDate());
        return appBillRefundRecordMapper.updateAppBillRefundRecord(appBillRefundRecord);
    }

    /**
     * 批量删除话费退款记录
     * 
     * @param recordIds 需要删除的话费退款记录ID
     * @return 结果
     */
    @Override
    public int deleteAppBillRefundRecordByIds(Long[] recordIds)
    {
        return appBillRefundRecordMapper.deleteAppBillRefundRecordByIds(recordIds);
    }

    /**
     * 删除话费退款记录信息
     * 
     * @param recordId 话费退款记录ID
     * @return 结果
     */
    @Override
    public int deleteAppBillRefundRecordById(Long recordId)
    {
        return appBillRefundRecordMapper.deleteAppBillRefundRecordById(recordId);
    }
}
